<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改功能关联信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-relation-edit" th:object="${menubarGl}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">客户端类型：</label>
                <div class="col-sm-8">
                    <select name="sysMark" class="form-control m-b" th:with="type=${@dict.getType('app_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sysMark}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">市场类型：</label>
                <div class="col-sm-8">
                    <input name="channel" th:field="*{channel}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">版本号：</label>
                <div class="col-sm-8">
                    <input name="version" th:field="*{version}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">菜单ids：</label>
                <div class="col-sm-8">
                        <input name="menubarIds" th:field="*{menubarIds}" class="form-control" type="text">
                    <!--
                        <input name="menubarIds" id="menubarIds" readonly onclick="selectMenubar()" th:field="*{menubarIds}" class="form-control" type="text">
                        <span class="input-group-addon" ><i class="fa fa-search"></i></span>-->
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">项目类型：</label>
                <div class="col-sm-8">
                    <select name="type" class="form-control m-b" th:field="*{type}">
                        <option th:selected="${type == '1'}" value="1">展业端管理</option>
                        <option th:selected="${type == '2'}" value="2">商户</option>
                        <option th:selected="${type == '3'}" value="3">引流平台</option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "menubar/relation";
        $("#form-relation-edit").validate({
            focusCleanup: true
        });
        function selectMenubar() {
            $.modal.open("选择功能", prefix + "/selectMenubar","600","500");
        }
        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-relation-edit').serialize());
            }
        }
    </script>
</body>
</html>